<template>
  <div class="site-wrapper site-404--not-found">
    <div class="site-404__wrapper">
      <div class="site-404-backgroup">
        <img class="site-404-backgroup__parent" src="@/assets/img/404.png" alt="404">
        <img class="site-404-backgroup__child left" src="@/assets/img/404_cloud.png" alt="404">
        <img class="site-404-backgroup__child mid" src="@/assets/img/404_cloud.png" alt="404">
        <img class="site-404-backgroup__child right" src="@/assets/img/404_cloud.png" alt="404">
      </div>
      <div class="site-404-content">
        <p class="site-404-content__desc">
          抱歉！您访问的页面
          <em>失联</em>
          啦 ...
        </p>
        <el-button @click="$router.go(-1)">返回上一页</el-button>
        <el-button type="primary" class="site-404-content__btn-gohome" @click="$router.push({ name: 'home' })">进入首页</el-button>
      </div>
    </div>
  </div>
</template>

<script>
export default {}
</script>

<style lang="scss" scoped>
.site-wrapper.site-404--not-found {
  transform: translate(-50%,-50%);
  position: absolute;
  top: 35%;
  left: 50%;
  .site-404__wrapper {
    position: relative;
    width: 1200px;
    padding: 0 50px;
    overflow: hidden;
    .site-404-backgroup {
      position: relative;
      float: left;
      width: 800px;
      overflow: hidden;
      left: 15%;
      &__parent {
        width: 100%;
      }
      &__child {
        position: absolute;
        &.left {
          width: 80px;
          top: 17px;
          left: 220px;
          opacity: 0;
          animation-name: cloudLeft;
          animation-duration: 2s;
          animation-timing-function: linear;
          animation-fill-mode: forwards;
          animation-delay: 1s;
        }
        &.mid {
          width: 46px;
          top: 10px;
          left: 420px;
          opacity: 0;
          animation-name: cloudMid;
          animation-duration: 2s;
          animation-timing-function: linear;
          animation-fill-mode: forwards;
          animation-delay: 1.2s;
        }
        &.right {
          width: 62px;
          top: 100px;
          left: 500px;
          opacity: 0;
          animation-name: cloudRight;
          animation-duration: 2s;
          animation-timing-function: linear;
          animation-fill-mode: forwards;
          animation-delay: 1s;
        }
        @keyframes cloudLeft {
          0% {
            top: 17px;
            left: 220px;
            opacity: 0;
          }
          20% {
            top: 33px;
            left: 188px;
            opacity: 1;
          }
          80% {
            top: 81px;
            left: 92px;
            opacity: 1;
          }
          100% {
            top: 97px;
            left: 60px;
            opacity: 0;
          }
        }
        @keyframes cloudMid {
          0% {
            top: 10px;
            left: 420px;
            opacity: 0;
          }
          20% {
            top: 40px;
            left: 360px;
            opacity: 1;
          }
          70% {
            top: 130px;
            left: 180px;
            opacity: 1;
          }
          100% {
            top: 160px;
            left: 120px;
            opacity: 0;
          }
        }
        @keyframes cloudRight {
          0% {
            top: 100px;
            left: 500px;
            opacity: 0;
          }
          20% {
            top: 120px;
            left: 460px;
            opacity: 1;
          }
          80% {
            top: 180px;
            left: 340px;
            opacity: 1;
          }
          100% {
            top: 200px;
            left: 300px;
            opacity: 0;
          }
        }
      }
    }
    .site-404-content {
      position: fixed;
      top: 95%;
      left: 50%;
      z-index: 2;
      padding: 30px;
      text-align: center;
      transform: translate(-50%, 0);
      &__desc {
        margin: 0 0 30px;
        font-size: 22px;
        text-transform: uppercase;
        color: rgb(118, 131, 143);
        > em {
          font-style: normal;
          color: #ee8145;
        }
      }
      &__btn-gohome {
        margin-left: 30px;
      }
    }
  }
}
</style>
